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

Unified Diff: chrome/browser/ui/views/external_tab_container_win.h

Issue 12220101: Minimal Chrome Frame with Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert install_worker.cc to un-break win64 build Created 7 years, 10 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/views/external_tab_container_win.h
diff --git a/chrome/browser/ui/views/external_tab_container_win.h b/chrome/browser/ui/views/external_tab_container_win.h
index 3d06fecf3dc1af2e602c5d2d2d38e6a16002dbc5..139db42e1a834dfe258ccdb0404ea3d2c45e70d7 100644
--- a/chrome/browser/ui/views/external_tab_container_win.h
+++ b/chrome/browser/ui/views/external_tab_container_win.h
@@ -25,7 +25,7 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/accelerators/accelerator.h"
-#include "ui/views/widget/native_widget_win.h"
+#include "ui/views/widget/widget_observer.h"
class AutomationProvider;
class Browser;
@@ -39,7 +39,9 @@ class ViewProp;
}
namespace views {
+class View;
class WebView;
+class Widget;
}
// This class serves as the container window for an external tab.
@@ -50,7 +52,7 @@ class ExternalTabContainerWin : public ExternalTabContainer,
public content::WebContentsDelegate,
public content::WebContentsObserver,
public content::NotificationObserver,
- public views::NativeWidgetWin,
+ public views::WidgetObserver,
public ui::AcceleratorTarget,
public InfoBarContainer::Delegate,
public BlockedContentTabHelperDelegate {
@@ -79,9 +81,10 @@ class ExternalTabContainerWin : public ExternalTabContainer,
virtual void Uninitialize() OVERRIDE;
virtual bool Reinitialize(AutomationProvider* automation_provider,
AutomationResourceMessageFilter* filter,
- gfx::NativeWindow parent_window) OVERRIDE;
+ HWND parent_window) OVERRIDE;
virtual content::WebContents* GetWebContents() const OVERRIDE;
- virtual gfx::NativeView GetExternalTabNativeView() const OVERRIDE;
+ virtual HWND GetExternalTabHWND() const OVERRIDE;
+ virtual HWND GetContentHWND() const OVERRIDE;
virtual void SetTabHandle(int handle) OVERRIDE;
virtual int GetTabHandle() const OVERRIDE;
virtual bool ExecuteContextMenuCommand(int command) OVERRIDE;
@@ -90,16 +93,6 @@ class ExternalTabContainerWin : public ExternalTabContainer,
virtual void FocusThroughTabTraversal(bool reverse,
bool restore_focus_to_view) OVERRIDE;
- // A helper method that tests whether the given window is an
- // ExternalTabContainerWin window.
- static bool IsExternalTabContainer(HWND window);
-
- // A helper function that returns a pointer to the ExternalTabContainerWin
- // instance associated with a native view. Returns NULL if the window
- // is not an ExternalTabContainerWin.
- static ExternalTabContainer* GetExternalContainerFromNativeWindow(
- gfx::NativeView native_window);
-
// Overridden from content::WebContentsDelegate:
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
@@ -219,15 +212,10 @@ class ExternalTabContainerWin : public ExternalTabContainer,
protected:
virtual ~ExternalTabContainerWin();
- // Overridden from views::NativeWidgetWin:
- virtual bool PreHandleMSG(UINT message,
- WPARAM w_param,
- LPARAM l_param,
- LRESULT* result) OVERRIDE;
- virtual void PostHandleMSG(UINT message,
- WPARAM w_param,
- LPARAM l_param) OVERRIDE;
- virtual void OnFinalMessage(HWND window);
+ // WidgetObserver overrides.
+ virtual void OnWidgetCreated(views::Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
+ virtual void OnWidgetDestroyed(views::Widget* widget) OVERRIDE;
bool InitNavigationInfo(NavigationInfo* nav_info,
content::NavigationType nav_type,
@@ -257,6 +245,7 @@ class ExternalTabContainerWin : public ExternalTabContainer,
// ExternalTabContainerWin.
void SetupExternalTabView();
+ views::Widget* widget_;
scoped_ptr<content::WebContents> web_contents_;
scoped_refptr<AutomationProvider> automation_;
@@ -284,6 +273,11 @@ class ExternalTabContainerWin : public ExternalTabContainer,
// whether top level URL requests are to be handled by the automation client.
bool handle_top_level_requests_;
+ // Set to true if the host needs to get notified of all top level navigations
+ // in this page. This typically applies to hosts which would render the new
+ // page without chrome frame.
+ bool route_all_top_level_navigations_;
+
// Contains ExternalTabContainers that have not been connected to as yet.
static base::LazyInstance<PendingTabs> pending_tabs_;
@@ -322,11 +316,6 @@ class ExternalTabContainerWin : public ExternalTabContainer,
IPC::Message* unload_reply_message_;
- // set to true if the host needs to get notified of all top level navigations
- // in this page. This typically applies to hosts which would render the new
- // page without chrome frame.
- bool route_all_top_level_navigations_;
-
scoped_ptr<ui::ViewProp> prop_;
// if this tab is a popup
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/views/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698