OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_OVERLAY_CONTROLLER_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_OVERLAY_CONTROLLER_VIEWS_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/instant/instant_overlay_controller.h" |
| 12 |
| 13 class Browser; |
| 14 class ContentsContainer; |
| 15 |
| 16 namespace views { |
| 17 class WebView; |
| 18 } |
| 19 |
| 20 // A controller that manages the Views-specific Instant overlay. Its primary |
| 21 // role is to respond to display-state changes from the Instant model and |
| 22 // reflect this in the visibility and layout of the overlay. |
| 23 class InstantOverlayControllerViews : public InstantOverlayController { |
| 24 public: |
| 25 InstantOverlayControllerViews(Browser* browser, ContentsContainer* contents); |
| 26 virtual ~InstantOverlayControllerViews(); |
| 27 |
| 28 views::WebView* overlay() { return overlay_.get(); } |
| 29 |
| 30 views::WebView* release_overlay() WARN_UNUSED_RESULT { |
| 31 return overlay_.release(); |
| 32 } |
| 33 |
| 34 private: |
| 35 // Overridden from InstantOverlayController: |
| 36 virtual void OverlayStateChanged(const InstantOverlayModel& model) OVERRIDE; |
| 37 |
| 38 ContentsContainer* const contents_; |
| 39 |
| 40 // The view that contains the Instant overlay web contents. |
| 41 scoped_ptr<views::WebView> overlay_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(InstantOverlayControllerViews); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_OVERLAY_CONTROLLER_VIEWS_H_ |
OLD | NEW |