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

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

Issue 10826253: Fix the browser windows from going in a loop trying to steal focus from each other when activating … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 // Handle the specified |accelerator| being pressed. 170 // Handle the specified |accelerator| being pressed.
171 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 171 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
172 172
173 // Provides the containing frame with the accelerator for the specified 173 // Provides the containing frame with the accelerator for the specified
174 // command id. This can be used to provide menu item shortcut hints etc. 174 // command id. This can be used to provide menu item shortcut hints etc.
175 // Returns true if an accelerator was found for the specified |cmd_id|, false 175 // Returns true if an accelerator was found for the specified |cmd_id|, false
176 // otherwise. 176 // otherwise.
177 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); 177 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator);
178 178
179 // Shows the next app-modal dialog box, if there is one to be shown, or moves
180 // an existing showing one to the front. Returns true if one was shown or
181 // activated, false if none was shown.
182 bool ActivateAppModalDialog() const;
183
184 // Returns the selected WebContents/TabContents. Used by our 179 // Returns the selected WebContents/TabContents. Used by our
185 // NonClientView's TabIconView::TabContentsProvider implementations. 180 // NonClientView's TabIconView::TabContentsProvider implementations.
186 // TODO(beng): exposing this here is a bit bogus, since it's only used to 181 // TODO(beng): exposing this here is a bit bogus, since it's only used to
187 // determine loading state. It'd be nicer if we could change this to be 182 // determine loading state. It'd be nicer if we could change this to be
188 // bool IsSelectedTabLoading() const; or something like that. We could even 183 // bool IsSelectedTabLoading() const; or something like that. We could even
189 // move it to a WindowDelegate subclass. 184 // move it to a WindowDelegate subclass.
190 content::WebContents* GetActiveWebContents() const; 185 content::WebContents* GetActiveWebContents() const;
191 TabContents* GetActiveTabContents() const; 186 TabContents* GetActiveTabContents() const;
192 187
193 // Retrieves the icon to use in the frame to indicate an OTR window. 188 // Retrieves the icon to use in the frame to indicate an OTR window.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 550
556 // Forces the LocationBarContainer to the top of the native window stacking 551 // Forces the LocationBarContainer to the top of the native window stacking
557 // order. This is needed for the Instant extended API when the location bar 552 // order. This is needed for the Instant extended API when the location bar
558 // can be placed over web contents. 553 // can be placed over web contents.
559 void RestackLocationBarContainer(); 554 void RestackLocationBarContainer();
560 555
561 // Calls |method| which is either RenderWidgetHost::Cut, ::Copy, or ::Paste 556 // Calls |method| which is either RenderWidgetHost::Cut, ::Copy, or ::Paste
562 // and returns true if the focus is currently on a WebContent. 557 // and returns true if the focus is currently on a WebContent.
563 bool DoCutCopyPaste(void (content::RenderWidgetHost::*method)()); 558 bool DoCutCopyPaste(void (content::RenderWidgetHost::*method)());
564 559
560 // Shows the next app-modal dialog box, if there is one to be shown, or moves
561 // an existing showing one to the front.
562 void ActivateAppModalDialog() const;
563
565 // Last focused view that issued a tab traversal. 564 // Last focused view that issued a tab traversal.
566 int last_focused_view_storage_id_; 565 int last_focused_view_storage_id_;
567 566
568 // The BrowserFrame that hosts this view. 567 // The BrowserFrame that hosts this view.
569 BrowserFrame* frame_; 568 BrowserFrame* frame_;
570 569
571 // The Browser object we are associated with. 570 // The Browser object we are associated with.
572 scoped_ptr<Browser> browser_; 571 scoped_ptr<Browser> browser_;
573 572
574 // BrowserView layout (LTR one is pictured here). 573 // BrowserView layout (LTR one is pictured here).
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 bool force_location_bar_focus_; 707 bool force_location_bar_focus_;
709 708
710 PendingFullscreenRequest fullscreen_request_; 709 PendingFullscreenRequest fullscreen_request_;
711 710
712 gfx::ScopedSysColorChangeListener color_change_listener_; 711 gfx::ScopedSysColorChangeListener color_change_listener_;
713 712
714 #if defined(USE_AURA) 713 #if defined(USE_AURA)
715 scoped_ptr<SearchViewController> search_view_controller_; 714 scoped_ptr<SearchViewController> search_view_controller_;
716 #endif 715 #endif
717 716
717 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
718
718 DISALLOW_COPY_AND_ASSIGN(BrowserView); 719 DISALLOW_COPY_AND_ASSIGN(BrowserView);
719 }; 720 };
720 721
721 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 722 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698