| OLD | NEW |
| 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_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GTK_H
_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GTK_H
_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GTK_H
_ | 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GTK_H
_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h" | 11 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h" |
| 12 #include "ui/views/controls/native/native_view_host.h" | 12 #include "ui/views/controls/native/native_view_host.h" |
| 13 | 13 |
| 14 class NativeTabContentsContainerGtk : public NativeTabContentsContainer, | 14 class NativeTabContentsContainerGtk : public NativeTabContentsContainer, |
| 15 public views::NativeViewHost { | 15 public views::NativeViewHost { |
| 16 public: | 16 public: |
| 17 explicit NativeTabContentsContainerGtk(TabContentsContainer* container); | 17 explicit NativeTabContentsContainerGtk(TabContentsContainer* container); |
| 18 virtual ~NativeTabContentsContainerGtk(); | 18 virtual ~NativeTabContentsContainerGtk(); |
| 19 | 19 |
| 20 // Overridden from NativeTabContentsContainer: | 20 // Overridden from NativeTabContentsContainer: |
| 21 virtual void AttachContents(content::WebContents* contents) OVERRIDE; | 21 virtual void AttachContents(content::WebContents* contents) OVERRIDE; |
| 22 virtual void DetachContents(content::WebContents* contents) OVERRIDE; | 22 virtual void DetachContents(content::WebContents* contents) OVERRIDE; |
| 23 virtual void SetFastResize(bool fast_resize) OVERRIDE; | 23 virtual void SetFastResize(bool fast_resize) OVERRIDE; |
| 24 virtual bool GetFastResize() const OVERRIDE; | 24 virtual bool GetFastResize() const OVERRIDE; |
| 25 virtual bool FastResizeAtLastLayout() const OVERRIDE; | 25 virtual bool FastResizeAtLastLayout() const OVERRIDE; |
| 26 virtual void RenderViewHostChanged(RenderViewHost* old_host, | 26 virtual void RenderViewHostChanged( |
| 27 RenderViewHost* new_host) OVERRIDE; | 27 content::RenderViewHost* old_host, |
| 28 content::RenderViewHost* new_host) OVERRIDE; |
| 28 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; | 29 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; |
| 29 virtual views::View* GetView() OVERRIDE; | 30 virtual views::View* GetView() OVERRIDE; |
| 30 | 31 |
| 31 // Overridden from views::View: | 32 // Overridden from views::View: |
| 32 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) OVERRIDE; | 33 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) OVERRIDE; |
| 33 virtual views::FocusTraversable* GetFocusTraversable() OVERRIDE; | 34 virtual views::FocusTraversable* GetFocusTraversable() OVERRIDE; |
| 34 virtual bool IsFocusable() const OVERRIDE; | 35 virtual bool IsFocusable() const OVERRIDE; |
| 35 virtual void OnFocus() OVERRIDE; | 36 virtual void OnFocus() OVERRIDE; |
| 36 virtual void RequestFocus() OVERRIDE; | 37 virtual void RequestFocus() OVERRIDE; |
| 37 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 38 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
| 38 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 39 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 TabContentsContainer* container_; | 42 TabContentsContainer* container_; |
| 42 | 43 |
| 43 gulong focus_callback_id_; | 44 gulong focus_callback_id_; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsContainerGtk); | 46 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsContainerGtk); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GT
K_H_ | 49 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_GT
K_H_ |
| OLD | NEW |