Home | History | Annotate | Download | only in views
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
      6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/compiler_specific.h"
     10 #include "build/build_config.h"
     11 #include "ui/base/accessibility/accessibility_types.h"
     12 #include "ui/views/views_delegate.h"
     13 
     14 class ChromeViewsDelegate : public views::ViewsDelegate {
     15  public:
     16   ChromeViewsDelegate() {}
     17   virtual ~ChromeViewsDelegate() {}
     18 
     19   // Overridden from views::ViewsDelegate:
     20   virtual void SaveWindowPlacement(const views::Widget* window,
     21                                    const std::string& window_name,
     22                                    const gfx::Rect& bounds,
     23                                    ui::WindowShowState show_state) OVERRIDE;
     24   virtual bool GetSavedWindowPlacement(
     25       const views::Widget* widget,
     26       const std::string& window_name,
     27       gfx::Rect* bounds,
     28       ui::WindowShowState* show_state) const OVERRIDE;
     29   virtual void NotifyAccessibilityEvent(
     30       views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE;
     31   virtual void NotifyMenuItemFocused(const base::string16& menu_name,
     32                                      const base::string16& menu_item_name,
     33                                      int item_index,
     34                                      int item_count,
     35                                      bool has_submenu) OVERRIDE;
     36 
     37 #if defined(OS_WIN)
     38   virtual HICON GetDefaultWindowIcon() const OVERRIDE;
     39   virtual bool IsWindowInMetro(gfx::NativeWindow window) const OVERRIDE;
     40 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
     41   virtual gfx::ImageSkia* GetDefaultWindowIcon() const OVERRIDE;
     42 #endif
     43   virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
     44       views::Widget* widget) OVERRIDE;
     45   virtual bool UseTransparentWindows() const OVERRIDE;
     46   virtual void AddRef() OVERRIDE;
     47   virtual void ReleaseRef() OVERRIDE;
     48   virtual content::WebContents* CreateWebContents(
     49       content::BrowserContext* browser_context,
     50       content::SiteInstance* site_instance) OVERRIDE;
     51   virtual void OnBeforeWidgetInit(
     52       views::Widget::InitParams* params,
     53       views::internal::NativeWidgetDelegate* delegate) OVERRIDE;
     54   virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() OVERRIDE;
     55 
     56  private:
     57   DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate);
     58 };
     59 
     60 #endif  // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
     61