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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 8068020: Converts usage of GetBrowserViewForNativeWindow to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback, and make ShowPageInfo platform specific Created 9 years, 2 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 | 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_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 public: 88 public:
89 // The browser view's class name. 89 // The browser view's class name.
90 static const char kViewClassName[]; 90 static const char kViewClassName[];
91 91
92 explicit BrowserView(Browser* browser); 92 explicit BrowserView(Browser* browser);
93 virtual ~BrowserView(); 93 virtual ~BrowserView();
94 94
95 void set_frame(BrowserFrame* frame) { frame_ = frame; } 95 void set_frame(BrowserFrame* frame) { frame_ = frame; }
96 BrowserFrame* frame() const { return frame_; } 96 BrowserFrame* frame() const { return frame_; }
97 97
98 #if defined(OS_WIN) && !defined(USE_AURA)
98 // Returns a pointer to the BrowserView* interface implementation (an 99 // Returns a pointer to the BrowserView* interface implementation (an
99 // instance of this object, typically) for a given native window, or NULL if 100 // instance of this object, typically) for a given native window, or NULL if
100 // there is no such association. 101 // there is no such association.
102 //
103 // Don't use this unless you only have a NativeWindow. In nearly all
104 // situations plumb through browser and use it.
101 static BrowserView* GetBrowserViewForNativeWindow(gfx::NativeWindow window); 105 static BrowserView* GetBrowserViewForNativeWindow(gfx::NativeWindow window);
106 #endif
107
108 // Returns the BrowserView used for the specified Browser.
109 static BrowserView* GetBrowserViewForBrowser(Browser* browser);
102 110
103 // Returns a Browser instance of this view. 111 // Returns a Browser instance of this view.
104 Browser* browser() const { return browser_.get(); } 112 Browser* browser() const { return browser_.get(); }
105 113
106 // Returns the apparent bounds of the toolbar, in BrowserView coordinates. 114 // Returns the apparent bounds of the toolbar, in BrowserView coordinates.
107 // These differ from |toolbar_.bounds()| in that they match where the toolbar 115 // These differ from |toolbar_.bounds()| in that they match where the toolbar
108 // background image is drawn -- slightly outside the "true" bounds 116 // background image is drawn -- slightly outside the "true" bounds
109 // horizontally, and, when using vertical tabs, behind the tab column. Note 117 // horizontally, and, when using vertical tabs, behind the tab column. Note
110 // that this returns the bounds for the toolbar area. 118 // that this returns the bounds for the toolbar area.
111 virtual gfx::Rect GetToolbarBounds() const; 119 virtual gfx::Rect GetToolbarBounds() const;
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 base::TimeTicks last_animation_time_; 704 base::TimeTicks last_animation_time_;
697 705
698 // If this flag is set then SetFocusToLocationBar() will set focus to the 706 // If this flag is set then SetFocusToLocationBar() will set focus to the
699 // location bar even if the browser window is not active. 707 // location bar even if the browser window is not active.
700 bool force_location_bar_focus_; 708 bool force_location_bar_focus_;
701 709
702 DISALLOW_COPY_AND_ASSIGN(BrowserView); 710 DISALLOW_COPY_AND_ASSIGN(BrowserView);
703 }; 711 };
704 712
705 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 713 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698