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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_view_mac.mm

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" 7 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
8 8
9 #include "chrome/browser/extensions/extension_host.h" 9 #include "chrome/browser/extensions/extension_host.h"
10 #include "chrome/common/view_type.h" 10 #include "chrome/common/view_type.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/render_widget_host_view.h" 12 #include "content/public/browser/render_widget_host_view.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_contents_view.h" 14 #include "content/public/browser/web_contents_view.h"
15 15
16 // The minimum/maximum dimensions of the popup. 16 // The minimum/maximum dimensions of the popup.
17 const CGFloat ExtensionViewMac::kMinWidth = 25.0; 17 const CGFloat ExtensionViewMac::kMinWidth = 25.0;
18 const CGFloat ExtensionViewMac::kMinHeight = 25.0; 18 const CGFloat ExtensionViewMac::kMinHeight = 25.0;
19 const CGFloat ExtensionViewMac::kMaxWidth = 800.0; 19 const CGFloat ExtensionViewMac::kMaxWidth = 800.0;
20 const CGFloat ExtensionViewMac::kMaxHeight = 600.0; 20 const CGFloat ExtensionViewMac::kMaxHeight = 600.0;
21 21
22 ExtensionViewMac::ExtensionViewMac(ExtensionHost* extension_host, 22 ExtensionViewMac::ExtensionViewMac(extensions::ExtensionHost* extension_host,
23 Browser* browser) 23 Browser* browser)
24 : browser_(browser), 24 : browser_(browser),
25 extension_host_(extension_host), 25 extension_host_(extension_host),
26 container_(NULL) { 26 container_(NULL) {
27 DCHECK(extension_host_); 27 DCHECK(extension_host_);
28 [native_view() setHidden:YES]; 28 [native_view() setHidden:YES];
29 } 29 }
30 30
31 ExtensionViewMac::~ExtensionViewMac() { 31 ExtensionViewMac::~ExtensionViewMac() {
32 } 32 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 void ExtensionViewMac::ShowIfCompletelyLoaded() { 89 void ExtensionViewMac::ShowIfCompletelyLoaded() {
90 // We wait to show the ExtensionView until it has loaded, and the view has 90 // We wait to show the ExtensionView until it has loaded, and the view has
91 // actually been created. These can happen in different orders. 91 // actually been created. These can happen in different orders.
92 if (extension_host_->did_stop_loading()) { 92 if (extension_host_->did_stop_loading()) {
93 [native_view() setHidden:NO]; 93 [native_view() setHidden:NO];
94 if (container_) 94 if (container_)
95 container_->OnExtensionViewDidShow(this); 95 container_->OnExtensionViewDidShow(this);
96 } 96 }
97 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698