Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2880)

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 10913243: extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: weak Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index a405101fdee26c7125ad5691b16c8871ebb8ee91..fa27064b114ce6f4b56c6a3398e98598cab1347c 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -9,6 +9,7 @@
#include "chrome/browser/debugger/devtools_window.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_process_manager.h"
+#include "chrome/browser/extensions/extension_view_container.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
@@ -56,20 +57,19 @@ CGFloat Clamp(CGFloat value, CGFloat min, CGFloat max) {
- (void)onViewDidShow;
@end
-class ExtensionPopupContainer : public ExtensionViewMac::Container {
+class ExtensionPopupContainer : public ExtensionViewContainer {
public:
explicit ExtensionPopupContainer(ExtensionPopupController* controller)
: controller_(controller) {
}
- virtual void OnExtensionSizeChanged(
- ExtensionViewMac* view,
- const gfx::Size& new_size) OVERRIDE {
+ virtual void OnExtensionSizeChanged(ExtensionView* view,
+ const gfx::Size& new_size) OVERRIDE {
[controller_ onSizeChanged:
NSMakeSize(new_size.width(), new_size.height())];
}
- virtual void OnExtensionViewDidShow(ExtensionViewMac* view) OVERRIDE {
+ virtual void OnExtensionViewDidShow(ExtensionView* view) OVERRIDE {
[controller_ onViewDidShow];
}
@@ -147,9 +147,9 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
InfoBubbleView* view = self.bubble;
[view setArrowLocation:arrowLocation];
- extensionView_ = host->view()->native_view();
+ extensionView_ = host->GetExtensionView()->GetNativeView();
container_.reset(new ExtensionPopupContainer(self));
- host->view()->set_container(container_.get());
+ host->GetExtensionView()->SetContainer(container_.get());
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center addObserver:self
@@ -197,8 +197,8 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
- (void)windowWillClose:(NSNotification *)notification {
[super windowWillClose:notification];
gPopup = nil;
- if (host_->view())
- host_->view()->set_container(NULL);
+ if (host_->GetExtensionView())
+ host_->GetExtensionView()->SetContainer(NULL);
}
- (void)windowDidResignKey:(NSNotification*)notification {
@@ -349,14 +349,14 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
- (void)windowDidResize:(NSNotification*)notification {
// Let the extension view know, so that it can tell plugins.
- if (host_->view())
- host_->view()->WindowFrameChanged();
+ if (host_->GetExtensionView())
+ host_->GetExtensionView()->WindowFrameChanged();
}
- (void)windowDidMove:(NSNotification*)notification {
// Let the extension view know, so that it can tell plugins.
- if (host_->view())
- host_->view()->WindowFrameChanged();
+ if (host_->GetExtensionView())
+ host_->GetExtensionView()->WindowFrameChanged();
}
// Private (TestingAPI)

Powered by Google App Engine
This is Rietveld 408576698