Home | History | Annotate | Download | only in content_client
      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 UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
      6 #define UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/memory/scoped_ptr.h"
     10 #include "content/public/browser/browser_main_parts.h"
     11 
     12 namespace content {
     13 class ShellBrowserContext;
     14 struct MainFunctionParams;
     15 }
     16 
     17 namespace views {
     18 class ViewsDelegate;
     19 
     20 namespace examples {
     21 
     22 class ExamplesBrowserMainParts : public content::BrowserMainParts {
     23  public:
     24   explicit ExamplesBrowserMainParts(
     25       const content::MainFunctionParams& parameters);
     26   virtual ~ExamplesBrowserMainParts();
     27 
     28   // Overridden from content::BrowserMainParts:
     29   virtual void PreMainMessageLoopRun() OVERRIDE;
     30   virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
     31   virtual void PostMainMessageLoopRun() OVERRIDE;
     32 
     33   content::ShellBrowserContext* browser_context() {
     34     return browser_context_.get();
     35   }
     36 
     37  private:
     38   scoped_ptr<content::ShellBrowserContext> browser_context_;
     39 
     40   scoped_ptr<ViewsDelegate> views_delegate_;
     41 
     42   DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts);
     43 };
     44 
     45 }  // namespace examples
     46 }  // namespace views
     47 
     48 #endif  // UI_VIEWS_EXAMPLES_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
     49