Skip to content

Commit

Permalink
Componentize //chrome/common/omnibox_focus_state.h
Browse files Browse the repository at this point in the history
Requires the creation of //components/omnibox/common.

BUG=371536
TBR=sky

Review URL: https://codereview.chromium.org/1224203003

Cr-Commit-Position: refs/heads/master@{#338018}
  • Loading branch information
colinblundell authored and JulienIsorce committed Jul 17, 2015
1 parent 02b2f15 commit cf8c4b5
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 15 deletions.
1 change: 1 addition & 0 deletions chrome/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include_rules = [
"+chrome/test",
"+components/content_settings/core/common",
"+components/error_page/common",
"+components/omnibox/common",
"+components/url_fixer",
"+components/variations",
"+content/public/common",
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ include_rules = [
"+components/navigation_metrics",
"+components/network_hints",
"+components/network_time",
"+components/omnibox",
"+components/omnibox/browser",
"+components/os_crypt",
"+components/password_manager",
"+components/pdf/browser",
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ source_set("ui") {
"//components/auto_login_parser",
"//components/dom_distiller/webui",
"//components/invalidation/impl",
"//components/omnibox/common",
"//components/onc",
"//components/password_manager/core/browser",
"//components/resources",
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/omnibox/omnibox_current_page_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "base/basictypes.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/omnibox_focus_state.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "ui/base/window_open_disposition.h"

class GURL;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/omnibox/omnibox_edit_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#include "base/time/time.h"
#include "chrome/browser/ui/omnibox/omnibox_controller.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/omnibox_focus_state.h"
#include "components/metrics/proto/omnibox_event.pb.h"
#include "components/omnibox/browser/autocomplete_controller_delegate.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/native_widget_types.h"
#include "url/gurl.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/search/instant_test_utils.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/search_types.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/search/search_ipc_router.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/time/time.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/window_open_disposition.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/search/search_ipc_router_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/search/search_tab_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "chrome/browser/ui/search/search_model.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "ui/base/window_open_disposition.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/search/search_tab_helper_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_browser_ui.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,7 @@
'../components/components.gyp:dom_distiller_core',
'../components/components.gyp:dom_distiller_webui',
'../components/components.gyp:invalidation_impl',
'../components/components.gyp:omnibox_common',
'../components/components.gyp:onc_component',
'../components/components.gyp:password_manager_core_browser',
'../components/components.gyp:sync_driver',
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
'common/multi_process_lock_linux.cc',
'common/multi_process_lock_mac.cc',
'common/multi_process_lock_win.cc',
'common/omnibox_focus_state.h',
'common/partial_circular_buffer.cc',
'common/partial_circular_buffer.h',
'common/pref_names_util.cc',
Expand Down Expand Up @@ -335,6 +334,7 @@
'<(DEPTH)/components/components.gyp:favicon_base',
'<(DEPTH)/components/components.gyp:json_schema',
'<(DEPTH)/components/components.gyp:metrics',
'<(DEPTH)/components/components.gyp:omnibox_common',
'<(DEPTH)/components/components.gyp:policy_component_common',
'<(DEPTH)/components/components.gyp:translate_core_common',
'<(DEPTH)/components/components.gyp:variations',
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
'../components/components.gyp:data_reduction_proxy_core_common',
'../components/components.gyp:guest_view_renderer',
'../components/components.gyp:network_hints_renderer',
'../components/components.gyp:omnibox_common',
'../components/components.gyp:error_page_renderer',
'../components/components.gyp:startup_metric_utils',
'../components/components.gyp:password_manager_content_renderer',
Expand Down
1 change: 1 addition & 0 deletions chrome/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static_library("common") {
"//components/favicon_base",
"//components/json_schema",
"//components/metrics",
"//components/omnibox/common",
"//components/policy:policy_component_common",
"//components/translate/core/common",
"//components/variations",
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/render_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include "chrome/common/common_param_traits.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/search_provider.h"
#include "chrome/common/web_application_info.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/nacl/common/nacl_types.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h"
#include "content/public/common/top_controls_state.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static_library("renderer") {
"//components/error_page/renderer",
"//components/guest_view/renderer",
"//components/network_hints/renderer",
"//components/omnibox/common",
"//components/password_manager/content/renderer",
"//components/plugins/renderer",
"//components/printing/renderer:printing_renderer",
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/searchbox/searchbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/renderer/searchbox/searchbox_extension.h"
#include "components/favicon_base/fallback_icon_url_parser.h"
#include "components/favicon_base/favicon_types.h"
#include "components/favicon_base/favicon_url_parser.h"
#include "components/favicon_base/large_icon_url_parser.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "net/base/escape.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/searchbox/searchbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "base/strings/string16.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/renderer/instant_restricted_id_cache.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
#include "ui/base/window_open_disposition.h"
Expand Down
12 changes: 12 additions & 0 deletions components/omnibox.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@
'omnibox/browser/zero_suggest_provider.h',
],
},
{
# GN version: //components/omnibox/common
'target_name': 'omnibox_common',
'type': 'none',
'include_dirs': [
'..',
],
'sources': [
# Note: sources list duplicated in GN build.
'components/omnibox/omnibox_focus_state.h',
],
},
{
# Protobuf compiler / generator for the InMemoryURLIndex caching
# protocol buffer.
Expand Down
9 changes: 9 additions & 0 deletions components/omnibox/common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("common") {
sources = [
"omnibox_focus_state.h",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_OMNIBOX_FOCUS_STATE_H_
#define CHROME_COMMON_OMNIBOX_FOCUS_STATE_H_
#ifndef COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FOCUS_STATE_H_
#define COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FOCUS_STATE_H_

// Omnibox focus state.
enum OmniboxFocusState {
Expand Down Expand Up @@ -39,4 +39,4 @@ enum OmniboxFocusChangeReason {
OMNIBOX_FOCUS_CHANGE_REASON_LAST = OMNIBOX_FOCUS_CHANGE_TYPING
};

#endif // CHROME_COMMON_OMNIBOX_FOCUS_STATE_H_
#endif // COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FOCUS_STATE_H_

0 comments on commit cf8c4b5

Please sign in to comment.