summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 14:50:22 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 14:50:22 +0000
commit66db7bc0efc03109bddc3b31f7944d7fe492f643 (patch)
tree5971098d7302f70a93e9c670ceb845e6bc6d8364
parent5bfd1e78ca6b5f45a15b1bff9316b2d981389fac (diff)
downloadchromium_src-66db7bc0efc03109bddc3b31f7944d7fe492f643.zip
chromium_src-66db7bc0efc03109bddc3b31f7944d7fe492f643.tar.gz
chromium_src-66db7bc0efc03109bddc3b31f7944d7fe492f643.tar.bz2
Revert 103113 - Move RenderWidgetHostViewMac to content.
BUG=95573 TEST=no visible change Review URL: http://codereview.chromium.org/8052026 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/8066010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103117 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_host_mac.mm2
-rw-r--r--chrome/browser/renderer_host/accelerated_plugin_view_mac.h (renamed from content/browser/renderer_host/accelerated_plugin_view_mac.h)6
-rw-r--r--chrome/browser/renderer_host/accelerated_plugin_view_mac.mm (renamed from content/browser/renderer_host/accelerated_plugin_view_mac.mm)5
-rw-r--r--chrome/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm (renamed from content/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm)2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h (renamed from content/browser/renderer_host/render_widget_host_view_mac.h)10
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm (renamed from content/browser/renderer_host/render_widget_host_view_mac.mm)11
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm (renamed from content/browser/renderer_host/render_widget_host_view_mac_unittest.mm)12
-rw-r--r--chrome/browser/tab_contents/popup_menu_helper_mac.mm2
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_view_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/framed_browser_window.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h (renamed from content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h)25
-rw-r--r--chrome/browser/ui/cocoa/rwhvm_editcommand_helper.mm (renamed from content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm)27
-rw-r--r--chrome/browser/ui/cocoa/rwhvm_editcommand_helper_unittest.mm (renamed from content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm)44
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.mm2
-rw-r--r--chrome/chrome_browser.gypi8
-rw-r--r--chrome/chrome_tests.gypi3
-rw-r--r--content/DEPS2
-rw-r--r--content/content_browser.gypi14
-rw-r--r--content/content_tests.gypi4
21 files changed, 88 insertions, 103 deletions
diff --git a/chrome/browser/extensions/extension_host_mac.mm b/chrome/browser/extensions/extension_host_mac.mm
index 9c9234b..23ec35d 100644
--- a/chrome/browser/extensions/extension_host_mac.mm
+++ b/chrome/browser/extensions/extension_host_mac.mm
@@ -4,10 +4,10 @@
#include "chrome/browser/extensions/extension_host_mac.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
#import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/common/native_web_keyboard_event.h"
ExtensionHostMac::~ExtensionHostMac() {
diff --git a/content/browser/renderer_host/accelerated_plugin_view_mac.h b/chrome/browser/renderer_host/accelerated_plugin_view_mac.h
index f404c52..af1b7ca 100644
--- a/content/browser/renderer_host/accelerated_plugin_view_mac.h
+++ b/chrome/browser/renderer_host/accelerated_plugin_view_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
-#define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
+#ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
+#define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
#import <Cocoa/Cocoa.h>
#include <QuartzCore/QuartzCore.h>
@@ -55,4 +55,4 @@ class RenderWidgetHostViewMac;
@end
-#endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
+#endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
diff --git a/content/browser/renderer_host/accelerated_plugin_view_mac.mm b/chrome/browser/renderer_host/accelerated_plugin_view_mac.mm
index 9bcc433..5b08a4b 100644
--- a/content/browser/renderer_host/accelerated_plugin_view_mac.mm
+++ b/chrome/browser/renderer_host/accelerated_plugin_view_mac.mm
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "content/browser/renderer_host/accelerated_plugin_view_mac.h"
+#import "chrome/browser/renderer_host/accelerated_plugin_view_mac.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
+#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "ui/gfx/gl/gl_switches.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
diff --git a/content/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm b/chrome/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm
index 4d902d2..a567c46 100644
--- a/content/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm
+++ b/chrome/browser/renderer_host/accelerated_plugin_view_mac_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/accelerated_plugin_view_mac.h"
+#include "chrome/browser/renderer_host/accelerated_plugin_view_mac.h"
#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 92e48c0..08b2922 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
-#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
+#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
+#define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
#pragma once
#import <Cocoa/Cocoa.h>
@@ -24,7 +24,7 @@
@class AcceleratedPluginView;
class RenderWidgetHostViewMac;
@class RenderWidgetHostViewMacDelegate;
-class RenderWidgetHostViewMacEditCommandHelper;
+class RWHVMEditCommandHelper;
@class ToolTip;
@protocol RenderWidgetHostViewMacOwner
@@ -45,7 +45,7 @@ class RenderWidgetHostViewMacEditCommandHelper;
BOOL canBeKeyView_;
BOOL takesFocusOnlyOnMouseDown_;
BOOL closeOnDeactivate_;
- scoped_ptr<RenderWidgetHostViewMacEditCommandHelper> editCommand_helper_;
+ scoped_ptr<RWHVMEditCommandHelper> editCommand_helper_;
// These are part of the magic tooltip code from WebKit's WebHTMLView:
id trackingRectOwner_; // (not retained)
@@ -407,4 +407,4 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
};
-#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
+#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 8f720a3..94530cd 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include <QuartzCore/QuartzCore.h>
@@ -16,18 +16,18 @@
#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
+#import "chrome/browser/renderer_host/accelerated_plugin_view_mac.h"
+#import "chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h"
#import "content/browser/accessibility/browser_accessibility_cocoa.h"
#include "content/browser/browser_thread.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/mac/closure_blocks_leopard_compat.h"
#include "content/browser/plugin_process_host.h"
-#import "content/browser/renderer_host/accelerated_plugin_view_mac.h"
#include "content/browser/renderer_host/backing_store_mac.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#import "content/browser/renderer_host/render_widget_host_view_mac_delegate.h"
-#import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h"
#import "content/browser/renderer_host/text_input_client_mac.h"
#include "content/common/edit_command.h"
#include "content/common/gpu/gpu_messages.h"
@@ -1112,7 +1112,7 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
- (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)r {
self = [super initWithFrame:NSZeroRect];
if (self) {
- editCommand_helper_.reset(new RenderWidgetHostViewMacEditCommandHelper);
+ editCommand_helper_.reset(new RWHVMEditCommandHelper);
editCommand_helper_->AddEditingSelectorsToClass([self class]);
renderWidgetHostView_.reset(r);
@@ -2459,8 +2459,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
return;
std::string command(
- [RenderWidgetHostViewMacEditCommandHelper::
- CommandNameForSelector(selector) UTF8String]);
+ [RWHVMEditCommandHelper::CommandNameForSelector(selector) UTF8String]);
// If this method is called when handling a key down event, then we need to
// handle the command in the key event handler. Otherwise we can just handle
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index 43e5300..5ee505c5 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "base/mac/scoped_nsautorelease_pool.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/browser/browser_thread.h"
-#include "content/browser/renderer_host/test_render_view_host.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/test/cocoa_test_event_utils.h"
-#import "ui/base/test/ui_cocoa_test_helper.h"
#include "webkit/plugins/npapi/webplugin.h"
-class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
+class RenderWidgetHostViewMacTest : public ChromeRenderViewHostTestHarness {
public:
RenderWidgetHostViewMacTest() : old_rwhv_(NULL), rwhv_mac_(NULL) {}
virtual void SetUp() {
- RenderViewHostTestHarness::SetUp();
+ ChromeRenderViewHostTestHarness::SetUp();
// TestRenderViewHost's destruction assumes that its view is a
// TestRenderWidgetHostView, so store its view and reset it back to the
@@ -38,7 +38,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
MessageLoop::current()->RunAllPending();
pool_.Recycle();
- RenderViewHostTestHarness::TearDown();
+ ChromeRenderViewHostTestHarness::TearDown();
}
protected:
// Adds an accelerated plugin view to |rwhv_cocoa_|. Returns a handle to the
diff --git a/chrome/browser/tab_contents/popup_menu_helper_mac.mm b/chrome/browser/tab_contents/popup_menu_helper_mac.mm
index 3125387..94672b8 100644
--- a/chrome/browser/tab_contents/popup_menu_helper_mac.mm
+++ b/chrome/browser/tab_contents/popup_menu_helper_mac.mm
@@ -8,8 +8,8 @@
#include "base/memory/scoped_nsobject.h"
#include "base/message_loop.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#import "content/common/chrome_application_mac.h"
#include "content/common/notification_source.h"
#import "ui/base/cocoa/base_view.h"
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 54161a9..c444fa1 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -9,6 +9,7 @@
#include <string>
#import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "chrome/browser/tab_contents/popup_menu_helper_mac.h"
#include "chrome/browser/tab_contents/render_view_context_menu_mac.h"
#import "chrome/browser/ui/cocoa/focus_tracker.h"
@@ -19,7 +20,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_widget_host.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#import "content/common/chrome_application_mac.h"
diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
index 9b7c20c..878adbe 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
@@ -1,12 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
#include "chrome/browser/extensions/extension_host.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
// The minimum/maximum dimensions of the popup.
const CGFloat ExtensionViewMac::kMinWidth = 25.0;
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index 997dfd8..296404e 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -10,8 +10,8 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
+#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "chrome/browser/themes/theme_service.h"
-#import "content/browser/renderer_host/render_widget_host_view_mac.h"
// Replicate specific 10.7 SDK declarations for building with prior SDKs.
#if !defined(MAC_OS_X_VERSION_10_7) || \
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm b/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
index 4fad1c0..3c9be8c 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
BalloonViewHost::BalloonViewHost(Balloon* balloon)
: BalloonHost(balloon) {
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h
index bdafbaf..85b572a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h
+++ b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_EDITCOMMAND_HELPER_H_
-#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_EDITCOMMAND_HELPER_H_
+#ifndef CHROME_BROWSER_UI_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
+#define CHROME_BROWSER_UI_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
#pragma once
#import <Cocoa/Cocoa.h>
@@ -11,8 +11,11 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/gtest_prod_util.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
+// RenderWidgetHostViewMacEditCommandHelper is the real name of this class
+// but that's too long, so we use a shorter version.
+//
// This class mimics the behavior of WebKit's WebView class in a way that makes
// sense for Chrome.
//
@@ -27,15 +30,15 @@
// (note that this is not a misspelling of RenderWidgetHostViewMac, it's in
// fact a distinct object) When these selectors are called, the relevant
// edit command is executed in WebCore.
-class RenderWidgetHostViewMacEditCommandHelper {
- FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewMacEditCommandHelperTest,
+class RWHVMEditCommandHelper {
+ FRIEND_TEST_ALL_PREFIXES(RWHVMEditCommandHelperTest,
TestAddEditingSelectorsToClass);
- FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewMacEditCommandHelperTest,
+ FRIEND_TEST_ALL_PREFIXES(RWHVMEditCommandHelperTest,
TestEditingCommandDelivery);
public:
- RenderWidgetHostViewMacEditCommandHelper();
- ~RenderWidgetHostViewMacEditCommandHelper();
+ RWHVMEditCommandHelper();
+ ~RWHVMEditCommandHelper();
// Adds editing selectors to the objc class using the objc runtime APIs.
// Each selector is connected to a single c method which forwards the message
@@ -64,7 +67,7 @@ class RenderWidgetHostViewMacEditCommandHelper {
private:
base::hash_set<std::string> edit_command_set_;
- DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMacEditCommandHelper);
+ DISALLOW_COPY_AND_ASSIGN(RWHVMEditCommandHelper);
};
-#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_EDITCOMMAND_HELPER_H_
+#endif // CHROME_BROWSER_UI_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper.mm
index 4ad3b76..8d24804 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm
+++ b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper.mm
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h"
+#import "chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h"
#import <objc/runtime.h>
+#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/renderer_host/render_widget_host.h"
-#import "content/browser/renderer_host/render_widget_host_view_mac.h"
namespace {
// The names of all the objc selectors w/o ':'s added to an object by
@@ -109,7 +109,7 @@ const char* kEditCommands[] = {
// This function is installed via the objc runtime as the implementation of all
// the various editing selectors.
// The objc runtime hookup occurs in
-// RenderWidgetHostViewMacEditCommandHelper::AddEditingSelectorsToClass().
+// RWHVMEditCommandHelper::AddEditingSelectorsToClass().
//
// self - the object we're attached to; it must implement the
// RenderWidgetHostViewMacOwner protocol.
@@ -129,7 +129,7 @@ void EditCommandImp(id self, SEL _cmd, id sender) {
// SEL -> command name string.
NSString* command_name_ns =
- RenderWidgetHostViewMacEditCommandHelper::CommandNameForSelector(_cmd);
+ RWHVMEditCommandHelper::CommandNameForSelector(_cmd);
std::string command([command_name_ns UTF8String]);
// Forward the edit command string down the pipeline.
@@ -153,8 +153,7 @@ void EditCommandImp(id self, SEL _cmd, id sender) {
// WebKit/mac/WebView/WebHTMLView.mm .
// Capitalized names are returned from this function, but that's simply
// matching WebHTMLView.mm.
-NSString* RenderWidgetHostViewMacEditCommandHelper::CommandNameForSelector(
- SEL selector) {
+NSString* RWHVMEditCommandHelper::CommandNameForSelector(SEL selector) {
if (selector == @selector(insertParagraphSeparator:) ||
selector == @selector(insertNewlineIgnoringFieldEditor:))
return @"InsertNewline";
@@ -175,19 +174,16 @@ NSString* RenderWidgetHostViewMacEditCommandHelper::CommandNameForSelector(
return [selector_str substringToIndex:selector_len - 1];
}
-RenderWidgetHostViewMacEditCommandHelper::
- RenderWidgetHostViewMacEditCommandHelper() {
+RWHVMEditCommandHelper::RWHVMEditCommandHelper() {
for (size_t i = 0; i < arraysize(kEditCommands); ++i) {
edit_command_set_.insert(kEditCommands[i]);
}
}
-RenderWidgetHostViewMacEditCommandHelper::
- ~RenderWidgetHostViewMacEditCommandHelper() {}
+RWHVMEditCommandHelper::~RWHVMEditCommandHelper() {}
// Dynamically adds Selectors to the aformentioned class.
-void RenderWidgetHostViewMacEditCommandHelper::AddEditingSelectorsToClass(
- Class klass) {
+void RWHVMEditCommandHelper::AddEditingSelectorsToClass(Class klass) {
for (size_t i = 0; i < arraysize(kEditCommands); ++i) {
// Append trailing ':' to command name to get selector name.
NSString* sel_str = [NSString stringWithFormat: @"%s:", kEditCommands[i]];
@@ -202,8 +198,7 @@ void RenderWidgetHostViewMacEditCommandHelper::AddEditingSelectorsToClass(
}
}
-bool RenderWidgetHostViewMacEditCommandHelper::IsMenuItemEnabled(
- SEL item_action,
+bool RWHVMEditCommandHelper::IsMenuItemEnabled(SEL item_action,
id<RenderWidgetHostViewMacOwner> owner) {
const char* selector_name = sel_getName(item_action);
// TODO(jeremy): The final form of this function will check state
@@ -223,7 +218,7 @@ bool RenderWidgetHostViewMacEditCommandHelper::IsMenuItemEnabled(
return ret;
}
-NSArray* RenderWidgetHostViewMacEditCommandHelper::GetEditSelectorNames() {
+NSArray* RWHVMEditCommandHelper::GetEditSelectorNames() {
size_t num_edit_commands = arraysize(kEditCommands);
NSMutableArray* ret = [NSMutableArray arrayWithCapacity:num_edit_commands];
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper_unittest.mm
index c81cc83..de32f41 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
+++ b/chrome/browser/ui/cocoa/rwhvm_editcommand_helper_unittest.mm
@@ -1,28 +1,28 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h"
+#import "chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h"
#import <Cocoa/Cocoa.h>
#include "base/message_loop.h"
+#include "chrome/test/base/testing_profile.h"
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/common/view_messages.h"
-#include "content/test/test_browser_context.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-class RenderWidgetHostViewMacEditCommandHelperTest : public PlatformTest {
+class RWHVMEditCommandHelperTest : public PlatformTest {
};
// Bare bones obj-c class for testing purposes.
-@interface RenderWidgetHostViewMacEditCommandHelperTestClass : NSObject
+@interface RWHVMEditCommandHelperTestClass : NSObject
@end
-@implementation RenderWidgetHostViewMacEditCommandHelperTestClass
+@implementation RWHVMEditCommandHelperTestClass
@end
// Class that owns a RenderWidgetHostViewMac.
@@ -31,7 +31,7 @@ class RenderWidgetHostViewMacEditCommandHelperTest : public PlatformTest {
RenderWidgetHostViewMac* rwhvm_;
}
-- (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)rwhvm;
+- (id) initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)rwhvm;
@end
@implementation RenderWidgetHostViewMacOwner
@@ -55,8 +55,7 @@ namespace {
// in test_obj.
// edit_commands is a list of NSStrings, selector names are formed by
// appending a trailing ':' to the string.
- bool CheckObjectRespondsToEditCommands(NSArray* edit_commands,
- id test_obj) {
+ bool CheckObjectRespondsToEditCommands(NSArray* edit_commands, id test_obj) {
for (NSString* edit_command_name in edit_commands) {
NSString* sel_str = [edit_command_name stringByAppendingString:@":"];
if (![test_obj respondsToSelector:NSSelectorFromString(sel_str)]) {
@@ -90,15 +89,14 @@ class RenderWidgetHostEditCommandCounter : public RenderWidgetHost {
// Tests that editing commands make it through the pipeline all the way to
// RenderWidgetHost.
// Disabled, http://crbug.com/93286.
-TEST_F(RenderWidgetHostViewMacEditCommandHelperTest,
- DISABLED_TestEditingCommandDelivery) {
- RenderWidgetHostViewMacEditCommandHelper helper;
+TEST_F(RWHVMEditCommandHelperTest, DISABLED_TestEditingCommandDelivery) {
+ RWHVMEditCommandHelper helper;
NSArray* edit_command_strings = helper.GetEditSelectorNames();
// Set up a mock render widget and set expectations.
MessageLoopForUI message_loop;
- TestBrowserContext browser_context;
- MockRenderProcessHost mock_process(&browser_context);
+ TestingProfile profile;
+ MockRenderProcessHost mock_process(&profile);
RenderWidgetHostEditCommandCounter render_widget(&mock_process, 0);
// RenderWidgetHostViewMac self destructs (RenderWidgetHostViewMacCocoa
@@ -120,17 +118,15 @@ TEST_F(RenderWidgetHostViewMacEditCommandHelperTest,
EXPECT_EQ(render_widget.edit_command_message_count_, num_edit_commands);
}
-// Test RenderWidgetHostViewMacEditCommandHelper::AddEditingSelectorsToClass
-TEST_F(RenderWidgetHostViewMacEditCommandHelperTest,
- TestAddEditingSelectorsToClass) {
- RenderWidgetHostViewMacEditCommandHelper helper;
+// Test RWHVMEditCommandHelper::AddEditingSelectorsToClass
+TEST_F(RWHVMEditCommandHelperTest, TestAddEditingSelectorsToClass) {
+ RWHVMEditCommandHelper helper;
NSArray* edit_command_strings = helper.GetEditSelectorNames();
ASSERT_GT([edit_command_strings count], 0U);
// Create a class instance and add methods to the class.
- RenderWidgetHostViewMacEditCommandHelperTestClass* test_obj =
- [[[RenderWidgetHostViewMacEditCommandHelperTestClass alloc] init]
- autorelease];
+ RWHVMEditCommandHelperTestClass* test_obj =
+ [[[RWHVMEditCommandHelperTestClass alloc] init] autorelease];
// Check that edit commands aren't already attached to the object.
ASSERT_FALSE(CheckObjectRespondsToEditCommands(edit_command_strings,
@@ -150,9 +146,9 @@ TEST_F(RenderWidgetHostViewMacEditCommandHelperTest,
test_obj));
}
-// Test RenderWidgetHostViewMacEditCommandHelper::IsMenuItemEnabled.
-TEST_F(RenderWidgetHostViewMacEditCommandHelperTest, TestMenuItemEnabling) {
- RenderWidgetHostViewMacEditCommandHelper helper;
+// Test RWHVMEditCommandHelper::IsMenuItemEnabled.
+TEST_F(RWHVMEditCommandHelperTest, TestMenuItemEnabling) {
+ RWHVMEditCommandHelper helper;
RenderWidgetHostViewMacOwner* rwhvm_owner =
[[[RenderWidgetHostViewMacOwner alloc] init] autorelease];
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index 6a07d23..928c6e9 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -18,6 +18,7 @@
#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "chrome/browser/tab_contents/thumbnail_generator.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/cocoa/animation_utils.h"
@@ -31,7 +32,6 @@
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/backing_store_mac.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index f53e678..349b3a5 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1903,6 +1903,8 @@
'browser/remove_rows_table_model.h',
'browser/remoting/firewall_traversal_observer.cc',
'browser/remoting/firewall_traversal_observer.h',
+ 'browser/renderer_host/accelerated_plugin_view_mac.h',
+ 'browser/renderer_host/accelerated_plugin_view_mac.mm',
'browser/renderer_host/accelerated_surface_container_touch.cc',
'browser/renderer_host/accelerated_surface_container_touch.h',
'browser/renderer_host/chrome_render_message_filter.cc',
@@ -1919,6 +1921,8 @@
'browser/renderer_host/java_bridge_channel_host.h',
'browser/renderer_host/offline_resource_handler.cc',
'browser/renderer_host/offline_resource_handler.h',
+ 'browser/renderer_host/render_widget_host_view_mac.h',
+ 'browser/renderer_host/render_widget_host_view_mac.mm',
'browser/renderer_host/render_widget_host_view_views.cc',
'browser/renderer_host/render_widget_host_view_views.h',
'browser/renderer_host/render_widget_host_view_views_touch.cc',
@@ -2661,6 +2665,8 @@
'browser/ui/cocoa/repost_form_warning_mac.mm',
'browser/ui/cocoa/restart_browser.h',
'browser/ui/cocoa/restart_browser.mm',
+ 'browser/ui/cocoa/rwhvm_editcommand_helper.h',
+ 'browser/ui/cocoa/rwhvm_editcommand_helper.mm',
'browser/ui/cocoa/search_engine_dialog_controller.h',
'browser/ui/cocoa/search_engine_dialog_controller.mm',
'browser/ui/cocoa/shell_dialogs_mac.mm',
@@ -4255,6 +4261,8 @@
'../third_party/molokocacao/NSBezierPath+MCAdditions.h',
'../third_party/molokocacao/NSBezierPath+MCAdditions.m',
# Build necessary Mozilla sources
+ '../third_party/mozilla/ComplexTextInputPanel.h',
+ '../third_party/mozilla/ComplexTextInputPanel.mm',
'../third_party/mozilla/NSPasteboard+Utils.h',
'../third_party/mozilla/NSPasteboard+Utils.mm',
'../third_party/mozilla/NSScreen+Utils.h',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 4728861..4228bc4 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1429,6 +1429,8 @@
'browser/profiles/profile_info_cache_unittest.cc',
'browser/profiles/profile_manager_unittest.cc',
'browser/remoting/firewall_traversal_observer_unittest.cc',
+ 'browser/renderer_host/accelerated_plugin_view_mac_unittest.mm',
+ 'browser/renderer_host/render_widget_host_view_mac_unittest.mm',
'browser/renderer_host/web_cache_manager_unittest.cc',
'browser/resources_util_unittest.cc',
'browser/rlz/rlz_unittest.cc',
@@ -1654,6 +1656,7 @@
'browser/ui/cocoa/run_loop_testing.h',
'browser/ui/cocoa/run_loop_testing.mm',
'browser/ui/cocoa/run_loop_testing_unittest.mm',
+ 'browser/ui/cocoa/rwhvm_editcommand_helper_unittest.mm',
'browser/ui/cocoa/status_bubble_mac_unittest.mm',
'browser/ui/cocoa/status_icons/status_icon_mac_unittest.mm',
'browser/ui/cocoa/styled_text_field_cell_unittest.mm',
diff --git a/content/DEPS b/content/DEPS
index 8742fd4..51bda9a 100644
--- a/content/DEPS
+++ b/content/DEPS
@@ -34,9 +34,7 @@ include_rules = [
"-v8",
"-tools",
- # Allow inclusion of third-party code:
"+third_party/gpsd",
- "+third_party/mozilla",
"+third_party/npapi/bindings",
"+third_party/sqlite",
"+third_party/tcmalloc",
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index e18fd38..1051cbc 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -293,8 +293,6 @@
'browser/plugin_service.h',
'browser/plugin_service_filter.h',
'browser/quota_permission_context.h',
- 'browser/renderer_host/accelerated_plugin_view_mac.h',
- 'browser/renderer_host/accelerated_plugin_view_mac.mm',
'browser/renderer_host/accelerated_surface_container_mac.cc',
'browser/renderer_host/accelerated_surface_container_mac.h',
'browser/renderer_host/accelerated_surface_container_manager_mac.cc',
@@ -404,11 +402,7 @@
'browser/renderer_host/render_widget_host_view.h',
'browser/renderer_host/render_widget_host_view_gtk.cc',
'browser/renderer_host/render_widget_host_view_gtk.h',
- 'browser/renderer_host/render_widget_host_view_mac.h',
- 'browser/renderer_host/render_widget_host_view_mac.mm',
'browser/renderer_host/render_widget_host_view_mac_delegate.h',
- 'browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h',
- 'browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm',
'browser/renderer_host/render_widget_host_view_win.cc',
'browser/renderer_host/render_widget_host_view_win.h',
'browser/renderer_host/resource_dispatcher_host.cc',
@@ -605,20 +599,12 @@
'sources!': [
'browser/power_save_blocker_stub.cc',
],
- 'sources': [
- # Build necessary Mozilla sources
- '../third_party/mozilla/ComplexTextInputPanel.h',
- '../third_party/mozilla/ComplexTextInputPanel.mm',
- ],
'link_settings': {
'mac_bundle_resources': [
'browser/gpu.sb',
'browser/worker.sb',
],
},
- 'dependencies': [
- 'closure_blocks_leopard_compat',
- ],
}, { # OS!="mac"
'dependencies': [
'../sandbox/sandbox.gyp:sandbox',
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index bc67eb2..c6224ee 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -12,7 +12,6 @@
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
- '../ui/ui.gyp:ui_test_support',
],
'include_dirs': [
'..',
@@ -120,7 +119,6 @@
'browser/in_process_webkit/webkit_thread_unittest.cc',
'browser/mac/closure_blocks_leopard_compat_unittest.cc',
'browser/mach_broker_mac_unittest.cc',
- 'browser/renderer_host/accelerated_plugin_view_mac_unittest.mm',
'browser/renderer_host/gtk_key_bindings_handler_unittest.cc',
'browser/renderer_host/media/audio_input_device_manager_unittest.cc',
'browser/renderer_host/media/audio_renderer_host_unittest.cc',
@@ -128,8 +126,6 @@
'browser/renderer_host/media/video_capture_host_unittest.cc',
'browser/renderer_host/media/video_capture_manager_unittest.cc',
'browser/renderer_host/render_view_host_unittest.cc',
- 'browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm',
- 'browser/renderer_host/render_widget_host_view_mac_unittest.mm',
'browser/renderer_host/resource_dispatcher_host_unittest.cc',
'browser/renderer_host/resource_queue_unittest.cc',
'browser/resolve_proxy_msg_helper_unittest.cc',