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

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

Issue 18859004: views impl: hide top infobar arrow when omnibox popup shows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct previous comment Created 7 years, 5 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) 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>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/devtools/devtools_window.h" 16 #include "chrome/browser/devtools/devtools_window.h"
17 #include "chrome/browser/infobars/infobar_container.h" 17 #include "chrome/browser/infobars/infobar_container.h"
18 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/browser/ui/omnibox/omnibox_popup_model_observer.h"
20 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 21 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
21 #include "chrome/browser/ui/views/frame/browser_frame.h" 22 #include "chrome/browser/ui/views/frame/browser_frame.h"
22 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 23 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
23 #include "chrome/browser/ui/views/load_complete_listener.h" 24 #include "chrome/browser/ui/views/load_complete_listener.h"
24 #include "ui/base/accelerators/accelerator.h" 25 #include "ui/base/accelerators/accelerator.h"
25 #include "ui/base/models/simple_menu_model.h" 26 #include "ui/base/models/simple_menu_model.h"
26 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
27 #include "ui/gfx/sys_color_change_listener.h" 28 #include "ui/gfx/sys_color_change_listener.h"
28 #include "ui/views/controls/button/button.h" 29 #include "ui/views/controls/button/button.h"
29 #include "ui/views/controls/single_split_view_listener.h" 30 #include "ui/views/controls/single_split_view_listener.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 public BrowserWindowTesting, 94 public BrowserWindowTesting,
94 public TabStripModelObserver, 95 public TabStripModelObserver,
95 public ui::AcceleratorProvider, 96 public ui::AcceleratorProvider,
96 public views::WidgetDelegate, 97 public views::WidgetDelegate,
97 public views::WidgetObserver, 98 public views::WidgetObserver,
98 public views::ClientView, 99 public views::ClientView,
99 public ImmersiveModeController::Delegate, 100 public ImmersiveModeController::Delegate,
100 public InfoBarContainer::Delegate, 101 public InfoBarContainer::Delegate,
101 public views::SingleSplitViewListener, 102 public views::SingleSplitViewListener,
102 public gfx::SysColorChangeListener, 103 public gfx::SysColorChangeListener,
103 public LoadCompleteListener::Delegate { 104 public LoadCompleteListener::Delegate,
105 public OmniboxPopupModelObserver {
104 public: 106 public:
105 // The browser view's class name. 107 // The browser view's class name.
106 static const char kViewClassName[]; 108 static const char kViewClassName[];
107 109
108 BrowserView(); 110 BrowserView();
109 virtual ~BrowserView(); 111 virtual ~BrowserView();
110 112
111 // Takes ownership of |browser|. 113 // Takes ownership of |browser|.
112 void Init(Browser* browser); 114 void Init(Browser* browser);
113 115
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 virtual void Layout() OVERRIDE; 450 virtual void Layout() OVERRIDE;
449 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; 451 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
450 virtual void ViewHierarchyChanged( 452 virtual void ViewHierarchyChanged(
451 const ViewHierarchyChangedDetails& details) OVERRIDE; 453 const ViewHierarchyChangedDetails& details) OVERRIDE;
452 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 454 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
453 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 455 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
454 456
455 // Overridden from ui::AcceleratorTarget: 457 // Overridden from ui::AcceleratorTarget:
456 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 458 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
457 459
460 // OmniboxPopupModelObserver overrides
461 virtual void OnOmniboxPopupShownOrHidden() OVERRIDE;
462
458 // Testing interface: 463 // Testing interface:
459 views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; } 464 views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; }
460 ContentsContainer* GetContentsContainerForTest() { 465 ContentsContainer* GetContentsContainerForTest() {
461 return contents_container_; 466 return contents_container_;
462 } 467 }
463 OverlayContainer* GetOverlayContainerForTest() { 468 OverlayContainer* GetOverlayContainerForTest() {
464 return overlay_container_; 469 return overlay_container_;
465 } 470 }
466 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } 471 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
467 472
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 599
595 // Shows the next app-modal dialog box, if there is one to be shown, or moves 600 // Shows the next app-modal dialog box, if there is one to be shown, or moves
596 // an existing showing one to the front. 601 // an existing showing one to the front.
597 void ActivateAppModalDialog() const; 602 void ActivateAppModalDialog() const;
598 603
599 // Called when overlay is committed, i.e. made the active contents, where 604 // Called when overlay is committed, i.e. made the active contents, where
600 // the overlay is reparented from |overlay_container_| to 605 // the overlay is reparented from |overlay_container_| to
601 // |contents_container_|. 606 // |contents_container_|.
602 void MakeOverlayContentsActiveContents(); 607 void MakeOverlayContentsActiveContents();
603 608
604 // Return the max top arrow height for infobar. 609 // Returns the max top arrow height for infobar.
605 int GetMaxTopInfoBarArrowHeight(); 610 int GetMaxTopInfoBarArrowHeight();
606 611
607 // Last focused view that issued a tab traversal. 612 // Last focused view that issued a tab traversal.
608 int last_focused_view_storage_id_; 613 int last_focused_view_storage_id_;
609 614
610 // The BrowserFrame that hosts this view. 615 // The BrowserFrame that hosts this view.
611 BrowserFrame* frame_; 616 BrowserFrame* frame_;
612 617
613 // The Browser object we are associated with. 618 // The Browser object we are associated with.
614 scoped_ptr<Browser> browser_; 619 scoped_ptr<Browser> browser_;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 gfx::ScopedSysColorChangeListener color_change_listener_; 783 gfx::ScopedSysColorChangeListener color_change_listener_;
779 784
780 scoped_ptr<InstantOverlayControllerViews> overlay_controller_; 785 scoped_ptr<InstantOverlayControllerViews> overlay_controller_;
781 786
782 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; 787 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
783 788
784 DISALLOW_COPY_AND_ASSIGN(BrowserView); 789 DISALLOW_COPY_AND_ASSIGN(BrowserView);
785 }; 790 };
786 791
787 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 792 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_popup_model_observer.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698