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

Side by Side Diff: chrome/browser/external_tab_container_win.h

Issue 8772041: Remove deprecated TabContentsDelegate::OpenURLFromTab variant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_
6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 bool Init(Profile* profile, 74 bool Init(Profile* profile,
75 HWND parent, 75 HWND parent,
76 const gfx::Rect& bounds, 76 const gfx::Rect& bounds,
77 DWORD style, 77 DWORD style,
78 bool load_requests_via_automation, 78 bool load_requests_via_automation,
79 bool handle_top_level_requests, 79 bool handle_top_level_requests,
80 TabContentsWrapper* existing_tab_contents, 80 TabContentsWrapper* existing_tab_contents,
81 const GURL& initial_url, 81 const GURL& initial_url,
82 const GURL& referrer, 82 const content::Referrer& referrer,
83 bool infobars_enabled, 83 bool infobars_enabled,
84 bool supports_full_tab_mode); 84 bool supports_full_tab_mode);
85 85
86 // Unhook the keystroke listener and notify about the closing TabContents. 86 // Unhook the keystroke listener and notify about the closing TabContents.
87 // This function gets called from three places, which is fine. 87 // This function gets called from three places, which is fine.
88 // 1. OnFinalMessage 88 // 1. OnFinalMessage
89 // 2. In the destructor. 89 // 2. In the destructor.
90 // 3. In AutomationProvider::CreateExternalTab 90 // 3. In AutomationProvider::CreateExternalTab
91 void Uninitialize(); 91 void Uninitialize();
92 92
(...skipping 20 matching lines...) Expand all
113 // is not an ExternalTabContainer. 113 // is not an ExternalTabContainer.
114 static ExternalTabContainer* GetExternalContainerFromNativeWindow( 114 static ExternalTabContainer* GetExternalContainerFromNativeWindow(
115 gfx::NativeView native_window); 115 gfx::NativeView native_window);
116 116
117 // A helper method that retrieves the ExternalTabContainer object that 117 // A helper method that retrieves the ExternalTabContainer object that
118 // hosts the given tab window. 118 // hosts the given tab window.
119 static ExternalTabContainer* GetContainerForTab(HWND tab_window); 119 static ExternalTabContainer* GetContainerForTab(HWND tab_window);
120 120
121 // Overridden from TabContentsDelegate: 121 // Overridden from TabContentsDelegate:
122 122
123 // Deprecated. Please used two-arguments variant.
124 // TODO(adriansc): Remove method once refactoring changed all call sites.
125 virtual TabContents* OpenURLFromTab(
126 TabContents* source,
127 const GURL& url,
128 const GURL& referrer,
129 WindowOpenDisposition disposition,
130 content::PageTransition transition) OVERRIDE;
131 virtual TabContents* OpenURLFromTab(TabContents* source, 123 virtual TabContents* OpenURLFromTab(TabContents* source,
132 const OpenURLParams& params) OVERRIDE; 124 const OpenURLParams& params) OVERRIDE;
133 virtual void NavigationStateChanged(const TabContents* source, 125 virtual void NavigationStateChanged(const TabContents* source,
134 unsigned changed_flags) OVERRIDE; 126 unsigned changed_flags) OVERRIDE;
135 virtual void AddNewContents(TabContents* source, 127 virtual void AddNewContents(TabContents* source,
136 TabContents* new_contents, 128 TabContents* new_contents,
137 WindowOpenDisposition disposition, 129 WindowOpenDisposition disposition,
138 const gfx::Rect& initial_pos, 130 const gfx::Rect& initial_pos,
139 bool user_gesture) OVERRIDE; 131 bool user_gesture) OVERRIDE;
140 virtual void CloseContents(TabContents* source) OVERRIDE; 132 virtual void CloseContents(TabContents* source) OVERRIDE;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 protected: 232 protected:
241 ~ExternalTabContainer(); 233 ~ExternalTabContainer();
242 // Overridden from views::NativeWidgetWin: 234 // Overridden from views::NativeWidgetWin:
243 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); 235 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct);
244 virtual void OnDestroy(); 236 virtual void OnDestroy();
245 virtual void OnFinalMessage(HWND window); 237 virtual void OnFinalMessage(HWND window);
246 238
247 bool InitNavigationInfo(NavigationInfo* nav_info, 239 bool InitNavigationInfo(NavigationInfo* nav_info,
248 content::NavigationType nav_type, 240 content::NavigationType nav_type,
249 int relative_offset); 241 int relative_offset);
250 void Navigate(const GURL& url, const GURL& referrer); 242 void Navigate(const GURL& url, const content::Referrer& referrer);
251 243
252 friend class base::RefCounted<ExternalTabContainer>; 244 friend class base::RefCounted<ExternalTabContainer>;
253 245
254 // Helper resource automation registration method, allowing registration of 246 // Helper resource automation registration method, allowing registration of
255 // pending RenderViewHosts. 247 // pending RenderViewHosts.
256 void RegisterRenderViewHostForAutomation(RenderViewHost* render_view_host, 248 void RegisterRenderViewHostForAutomation(RenderViewHost* render_view_host,
257 bool pending_view); 249 bool pending_view);
258 250
259 // Helper function for processing keystokes coming back from the renderer 251 // Helper function for processing keystokes coming back from the renderer
260 // process. 252 // process.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 359
368 virtual bool ProcessUnhandledKeyStroke(HWND window, UINT message, 360 virtual bool ProcessUnhandledKeyStroke(HWND window, UINT message,
369 WPARAM wparam, LPARAM lparam) { 361 WPARAM wparam, LPARAM lparam) {
370 NOTREACHED(); 362 NOTREACHED();
371 return false; 363 return false;
372 } 364 }
373 365
374 virtual void Observe(int type, const content::NotificationSource& source, 366 virtual void Observe(int type, const content::NotificationSource& source,
375 const content::NotificationDetails& details) {} 367 const content::NotificationDetails& details) {}
376 368
377 // Deprecated. Please use the two-argument variant.
378 // TODO(adriansc): Remove method once refactoring changed all call sites.
379 virtual TabContents* OpenURLFromTab(
380 TabContents* source, const GURL& url,
381 const GURL& referrer,
382 WindowOpenDisposition disposition,
383 content::PageTransition transition) OVERRIDE;
384 virtual TabContents* OpenURLFromTab(TabContents* source, 369 virtual TabContents* OpenURLFromTab(TabContents* source,
385 const OpenURLParams& params) OVERRIDE; 370 const OpenURLParams& params) OVERRIDE;
386 371
387 virtual void NavigationStateChanged(const TabContents* source, 372 virtual void NavigationStateChanged(const TabContents* source,
388 unsigned changed_flags) { 373 unsigned changed_flags) {
389 NOTREACHED(); 374 NOTREACHED();
390 } 375 }
391 376
392 virtual void CloseContents(TabContents* source) { 377 virtual void CloseContents(TabContents* source) {
393 NOTREACHED(); 378 NOTREACHED();
(...skipping 20 matching lines...) Expand all
414 return false; 399 return false;
415 } 400 }
416 401
417 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, 402 virtual void BeforeUnloadFired(TabContents* tab, bool proceed,
418 bool* proceed_to_fire_unload) { 403 bool* proceed_to_fire_unload) {
419 NOTREACHED(); 404 NOTREACHED();
420 } 405 }
421 }; 406 };
422 407
423 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ 408 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | chrome/browser/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698